﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>

<div style="padding:10px">
<div class="title"><span class="title_icon"><img src="../../Content/images/bullet1.gif" alt="" /></span>Special gifts</div>
    <%-- <% var catelogy = (Bussiness.Article) ViewData["ListArticles"]; %>--%>

    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel id="UpdatePanel1" runat="server">
      <contenttemplate>


       <% foreach (var artical in ((IEnumerable<Bussiness.Article>)ViewData["ListArticles"]))
          { %>
      <div class="feat_prod_box">
        <div class="prod_img"><a href="http://www.free-css.com/"><img src="<%= artical.SubImage%>" alt="" border="0" width="130px" height="130px"/></a></div>
        <div class="prod_det_box"> 
          <div class="box_top"></div>
          <div class="box_center">
            <div class="prod_title"><a href="/Artical/ChiTietBaiViet/?ID=<%= artical.ID %>" style="text-decoration: none;font-size:16px"> <%= artical.Title%> </a></div>
            <p class="details"><%= artical.SubContent%></p>
            <a href="/Artical/ChiTietBaiViet/?ID=<%= artical.ID %>" class="more">- Chi tiết -</a>
            <div class="clear"></div>
          </div>
          <div class="box_bottom"></div>
        </div>
        <div class="clear"></div>
      </div>
      <%} %>

      </contenttemplate>
         </asp:UpdatePanel>


  <div class="pagination"> 
         <% foreach (var paging in ((IEnumerable<int>)ViewData["ListPage"]))
            { %>
            
                <a href='/Artical/DanhSachBaiViet/?ID_Catelogy=3&PageIndex=<%=paging%>' ><span  id='page_<%=paging%>'><%= paging%></span></a>
                
           <%} %>
        <%-- <span class="current">1</span>--%>
       
         </div>
</div>
<script language="javascript">
    //    function Paging(obj) {
    //        document.getElementById(obj).className = "current";
    //    }

    window.onload = function () {
        document.getElementById('page_<%= Request.QueryString["PageIndex"] %>').className = "current";
    };
</script>